<% cache(['notifications', Notifications::VERSION, notification, notification.actor, notification.read?]) do %>
<div id="notification-<%= notification.id %>"
     data-id="<%= notification.id %>"
     class="media notification notification-<%= notification.notify_type %><%= ' unread' if !notification.read? %>">
  <div class="media-left mr-3">
    <%= link_to image_tag(notification.actor_avatar_url), notification.actor_profile_url, title: notification.actor_name, class: 'user-avatar' %>
  </div>
  <div class="media-body">
    <%= render partial: "/notifications/#{notification.notify_type.underscore}", locals: { notification: notification } %>
  </div>
  <div class="media-right">
    <%= notification.created_at.strftime('%H:%M') %>
  </div>
</div>
<% end %>
